//Written by Nathan Faubion: http://n-son.com
//Use this or edit how you want, just give me
//some credit!
var scroller  = null;
var scrollbar = null;
var scrollTween = null;

window.onload = function () {
    scroller  = new jsScroller(document.getElementById("leftmenu"), 150, 350);
    scrollbar = new jsScrollbar (document.getElementById("Scrollbar-Container"), scroller, true, scrollbarEvent);
    scrollTween = new jsScrollerTween (scrollbar, true);
    scrollbar._scrollDist = 10;
    scrollbar.tweenTo(document.getElementById('selected').offsetTop-140);
}

function scrollbarEvent (o, type) {
    if (type == "mousedown") {
        if (o.className == "Scrollbar-Track") o.style.backgroundColor = "#CECE07";
        else o.style.backgroundColor = "#CECE07";//mousedown color
    } else {
        if (o.className == "Scrollbar-Track") o.style.backgroundColor = "#b8b804";
        else o.style.backgroundColor = "#b8b804";//original color
    }
}